﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpShare.Configuration;
using System.Configuration;

namespace SharpShare.Vfs.Configuration {
    public class VfsShareConfigurationElement : ShareElement {

        [ConfigurationProperty("mountPoint", IsRequired = true)]
        public string MountPoint {
            get {
                return (string)this["mountPoint"];
            }
            set {
                this["mountPoint"] = value;
            }
        }

        public override void ConfigureService(IShareService service, Storage.IStorageProvider storageProvider, IConfigurationContext context) {
            ((VfsShareServer)service ).AssignMountPoint(storageProvider, this.MountPoint);
        }
    }
}
